package spring.mvc.service.impl;

import java.util.List;

import javax.annotation.Resource;

import spring.mvc.dao.BoardDao;
import spring.mvc.domain.Board;
import spring.mvc.service.BoardService;

import org.springframework.stereotype.Service;

@Service
public class BoardServiceImpl implements BoardService{
	@Resource
	private BoardDao BoardDao;

	public Integer write(Board board) throws Exception
	{
		board.setStep(0);
		return BoardDao.write(board);
	}
	
	public Board view(String seq) throws Exception
	{
		return BoardDao.view(seq);
	}
	
	public List<Board> list() throws Exception
	{
		return BoardDao.list();
	}
	
	public void update(Board board) throws Exception
	{
		BoardDao.update(board);
	}
	
	public void delete(String seq) throws Exception
	{
		BoardDao.delete(seq);
	}
	
	public Integer addReply(Board board) throws Exception
	{
		return BoardDao.addReply(board);
	}
	
}
